<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<body>
<div id="app">
    <input type="button" value="v-on指令" v-on:click="justDo">
    <input type="button" value="v-on简写" @click="doIt">
    <input type="button" value="双击事件" @dblclick="changeWrite">
    <h1 @click="changeWrite">{{write}}</h1>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    var app = new Vue({
        el:'#app',
        data:{
            write:"公众号：就这样写"
        },
        methods:{
            justDo:function () {
                alert('just do it')
            },
            doIt:function () {
                alert('只做IT')
            },
            changeWrite:function () {
                this.write+="写的真不赖！"
            }
        }
    })

</script>
</body>
</body>
</html>